package jdk8特性_壹证通公司面试.方法引用;

public class MethodRerference2 {

    public static int method(int num,MyCalc c){
        return c.calc(num);
    }

    public static void main(String[] args) {
        int number = method(-10, num -> Math.abs(num));

        int number1 = method(-10, Math::abs);
        System.out.println(number);
        System.out.println(number1);
    }
}
